package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotRoomTypeMapper;
import com.gaohe.hotal.domain.HotRoomType;
import com.gaohe.hotal.service.IHotRoomTypeService;

/**
 * 房间类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotRoomTypeServiceImpl implements IHotRoomTypeService 
{
    @Autowired
    private HotRoomTypeMapper hotRoomTypeMapper;

    /**
     * 查询房间类型
     * 
     * @param roomTypeId 房间类型主键
     * @return 房间类型
     */
    @Override
    public HotRoomType selectHotRoomTypeByRoomTypeId(Long roomTypeId)
    {
        return hotRoomTypeMapper.selectHotRoomTypeByRoomTypeId(roomTypeId);
    }

    /**
     * 查询房间类型列表
     * 
     * @param hotRoomType 房间类型
     * @return 房间类型
     */
    @Override
    public List<HotRoomType> selectHotRoomTypeList(HotRoomType hotRoomType)
    {
        return hotRoomTypeMapper.selectHotRoomTypeList(hotRoomType);
    }

    /**
     * 新增房间类型
     * 
     * @param hotRoomType 房间类型
     * @return 结果
     */
    @Override
    public int insertHotRoomType(HotRoomType hotRoomType)
    {
        hotRoomType.setCreateTime(DateUtils.getNowDate());
        return hotRoomTypeMapper.insertHotRoomType(hotRoomType);
    }

    /**
     * 修改房间类型
     * 
     * @param hotRoomType 房间类型
     * @return 结果
     */
    @Override
    public int updateHotRoomType(HotRoomType hotRoomType)
    {
        hotRoomType.setUpdateTime(DateUtils.getNowDate());
        return hotRoomTypeMapper.updateHotRoomType(hotRoomType);
    }

    /**
     * 批量删除房间类型
     * 
     * @param roomTypeIds 需要删除的房间类型主键
     * @return 结果
     */
    @Override
    public int deleteHotRoomTypeByRoomTypeIds(Long[] roomTypeIds)
    {
        return hotRoomTypeMapper.deleteHotRoomTypeByRoomTypeIds(roomTypeIds);
    }

    /**
     * 删除房间类型信息
     * 
     * @param roomTypeId 房间类型主键
     * @return 结果
     */
    @Override
    public int deleteHotRoomTypeByRoomTypeId(Long roomTypeId)
    {
        return hotRoomTypeMapper.deleteHotRoomTypeByRoomTypeId(roomTypeId);
    }
}
